- /* sxcspi.cpp by K.Tsuru */
- // function ID 5106 BRADIX
- /****************************************************
- SDecimal and SDouble class
- pi by Stormer's formura
- pi/4 = 6*arctan(1/8) + 2*arctan(1/57) + arctan(1/239)
- *****************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- SDecimal BStomerPi(){
- SDecimal pi, y;
-
- XsMult(Batan2(1, 8), 6, pi); // 6*atan(1/8)
- XsMult(Batan2(1, 57), 2, y); // y = 2*atan(1/57)
- XXAdd(pi, y, pi);
- y = Batan2(1, 239);
- XXAdd(pi, y, pi);
- XsMult(pi, 4, pi);
-
- return pi;
- }
- // function ID 3509 DRADIX
- SDouble StomerPi(){
- return BStomerPi().ConvToDec();
- }
sxcspi.cpp : last modifiled at 2016/09/21 09:16:24(655 bytes)
created at 2016/10/31 11:11:16
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).